4
4
.
.
4
4
.
.
4
4
E
E
l
l
l
l
i
i
p
p
s
s
e
e
I
I
n
n
f
f
o
o
[
[
R
R
]
]
This tutorials shows how to add View in the shape of the Ellipse.
You can't combine fill and stroke on the same Ellipse.
Fill
struct ContentView : View {
var body : some View {
Ellipse()
.rotation(.degrees(45))
.fill(Color.green)
.frame(width: 100, height: 50)
}
}
Stroke
struct ContentView : View {
var body : some View {
Ellipse()
.rotation(.degrees(45))
.stroke(Color.green, lineWidth: 2)
.frame(width: 100, height: 50)
}
}
Fill Stroke